﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HgReleaseNotesGen
{
    using System.Diagnostics;

    [DebuggerDisplay("{LocalId}:{RepositoryId}")]
    class ChangesetId
    {
        public string LocalId { get; private set; }
        public string RepositoryId { get; private set; }

        public ChangesetId(string changesetIdText)
        {
            var local = changesetIdText.SubstringBefore(':');
            var remote = changesetIdText.SubstringAfter(':');
            this.LocalId = local.Trim();
            this.RepositoryId = remote.Trim();
        }

        public ChangesetId(string localId, string repositoryId)
        {
            this.LocalId = localId.Trim();
            this.RepositoryId = repositoryId.Trim();
        }
    }
}
